<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>专家咨询查看页面</title>
    <script src="../../res/js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../res/layui/layui.js"></script>
    <script src="../../res/js/Tools.js" type="text/javascript" charset="utf-8"></script>
    <script>
        $(function(){
            var id=getQueryString("id");
            var url = "../../mase/findBySaId";
            var data = {id:id};
            $.post(url,data,function(obj){
                console.info(obj);
                var auditState="";
                if(obj.auditState=="10"){
                    auditState="申请中";
                }else if(obj.auditState=="20"){
                    auditState="中心领导已同意";
                }else if(obj.auditState=="21"){
                    auditState="中心领导不同意";
                }else if(obj.auditState=="30"){
                    auditState="专家已获知待回复";
                }else if(obj.auditState=="40"){
                    auditState="专家已回复";
                }
                var html ="<td>"+obj.applyForTime+"</td><td>"+obj.applyForExp+"</td><td>"+obj.saName+"</td><td>"+auditState+"</td>";
                if(obj.results==null||obj.results=="null"){
                    html+="<td>无</td>";
                }else{
                    html+="<td><a href='../.."+obj.results+"'>下载</a></td>";
                }
                html+="<td>"+obj.expertName+"</td>";
                $("#tr").append(html);
            },"json");
        })
    </script>
</head>
<body>
<div class="layui-form">
    <table class="layui-table" lay-even="" lay-skin="row">
        <thead>
        <tr>
            <th>申请时间</th>
            <th>申请理由</th>
            <th>方案名称</th>
            <th>审核状态</th>
            <th>专家咨询结果</th>
            <th>专家姓名</th>
        </tr>
        </thead>
        <tbody>
        <tr id="tr"></tr>
        </tbody>
    </table>
</div>
</body>
</html>